const parentCode = 'orderManagement'
export default [
  {
    path: "/orderManagement",
    meta: {
      title: "工单管理",
      code: parentCode, //来确定是哪个模块，一级菜单的code
    },
    component: (resolve) => require(["@/views/orderManagement"], resolve),
    children: [
      {
        path: "/",
        redirect: "defectOrder",
      },
      {
        path: "patrolOrder",
        name: "patrolOrder",
        meta: {
          title: "巡视工单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "patrolOrder",
          menuType: "patrol",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/patrolOrder"], resolve),
      },
      {
        path: "defectOrder",
        meta: {
          title: "缺陷工单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "defectOrder", //二级菜单的code
        },
        component: (resolve) =>
          require(["@/views/orderManagement/defectOrder"], resolve),
        children: [
          {
            path: "/",
            redirect: "defectsElectrical",
          },
          {
            path: "defectsElectrical",
            name: "defectsElectrical",
            meta: {
              title: "机电类",
              menuType: "mechatronics",
              parentCode: parentCode,
              code: "defectOrder",
            },
            component: (resolve) =>
              require([
                "@/views/orderManagement/defectOrder/property",
              ], resolve),
          },
          {
            path: "defectsHydraulic",
            name: "defectsHydraulic",
            meta: {
              title: "水工类",
              parentCode: parentCode,
              menuType: "irrigation",
              code: "defectOrder",
            },
            component: (resolve) =>
              require([
                "@/views/orderManagement/defectOrder/property",
              ], resolve),
          },
          {
            path: "defectsProperty",
            name: "defectsProperty",
            meta: {
              title: "物业类",
              parentCode: parentCode,
              menuType: "property",
              code: "defectOrder",
            },
            component: (resolve) =>
              require([
                "@/views/orderManagement/defectOrder/property",
              ], resolve),
          },
          {
            path: "defectsInformation",
            name: "defectsInformation",
            meta: {
              title: "信息类",
              parentCode: parentCode,
              menuType: "information",
              code: "defectOrder",
            },
            component: (resolve) =>
              require([
                "@/views/orderManagement/defectOrder/property",
              ], resolve),
          },
          {
            path: "defectsOther",
            name: "defectsOther",
            meta: {
              title: "其它类",
              parentCode: parentCode,
              menuType: "others",
              code: "defectOrder",
            },
            component: (resolve) =>
              require([
                "@/views/orderManagement/defectOrder/property",
              ], resolve),
          },
        ],
      },
      {
        path: "normalMaintenance",
        name: "normalMaintenance",
        meta: {
          title: "正常维护工单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "normalMaintenance",
          menuType: "maintain",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/normalMaintenance"], resolve),
      },
      {
        path: "experimentOrder",
        name: "experimentOrder",
        meta: {
          title: "试验工单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "experimentOrder",
          menuType: "experiment",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/normalMaintenance"], resolve),
      },
      {
        path: "overhaulApplication",
        name: "overhaulApplication",
        meta: {
          title: "检修申请单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "overhaulApplication",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/overhaulApplication"], resolve),
      },
      {
        path: "overhaul",
        name: "overhaul",
        meta: {
          title: "大修工单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "overhaul",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/overhaul"], resolve),
      },
      {
        path: "classification",
        name: "classification",
        meta: {
          title: "分级分项验收单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "classification",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/classification"], resolve),
      },
      {
        path: "concessionAccept",
        name: "concessionAccept",
        meta: {
          title: "让步接收单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "concessionAccept",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/concessionAccept"], resolve),
      },
      {
        path: "majorIssues",
        name: "majorIssues",
        meta: {
          title: "重大问题单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "majorIssues",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/majorIssues"], resolve),
      },
      {
        path: "planRepair",
        name: "planRepair",
        meta: {
          title: "计划检修",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "planRepair",
          menuType: "repair",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/normalMaintenance"], resolve),
      },
      {
        path: "spotCheck",
        name: "spotCheck",
        meta: {
          title: "工单抽查",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "spotCheck",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/spotCheck"], resolve),
      },
      {
        path: "spotStatistics",
        //name: "spotStatistics",
        meta: {
          title: "工单统计",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "spotStatistics",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/spotStatistics"], resolve),
          children: [
            {
              path: "/",
              redirect: "defectEliminationRate",
            },
            {
              path: "defectEliminationRate",
              name: "defectEliminationRate",
              meta: {
                title: "消缺率",
                //menuType: "mechatronics",
                parentCode: parentCode,
                code: "spotStatistics",
              },
              component: (resolve) =>
                require([
                  "@/views/orderManagement/spotStatistics/defectEliminationRate",
                ], resolve),
            },
            {
              path: "timelyDefectEliminationRate",
              name: "timelyDefectEliminationRate",
              meta: {
                title: "消缺及时率",
                parentCode: parentCode,
                //menuType: "irrigation",
                code: "spotStatistics",
              },
              component: (resolve) =>
                require([
                  "@/views/orderManagement/spotStatistics/timelyDefectEliminationRate",
                ], resolve),
            },
            {
              path: "defectDensityStatistics",
              name: "defectDensityStatistics",
              meta: {
                title: "缺陷数量统计",
                parentCode: parentCode,
                code: "spotStatistics",
              },
              component: (resolve) => require([
                "@/views/orderManagement/spotStatistics/defectDensityStatistic"
              ], resolve)
            }
          ],
      },
      {
        path: "defectDegradation",
        name: "defectDegradation",
        meta: {
          title: "缺陷降级单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "defectDegradation",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/defectDegradation"], resolve),
      },
      {
        path: "defectPending",
        name: "defectPending",
        meta: {
          title: "缺陷待处理单",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "defectPending",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/defectPending"], resolve),
      },
      {
        path: "orderChange",
        name: "orderChange",
        meta: {
          title: "工单变更",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "orderChange",
        },
        component: (resolve) =>
          require(["@/views/orderManagement/orderChange"], resolve),
      },
    ],
  },
];